Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: add actionlint job #1

Merged
merged 1 commit into from
Oct 13, 2024
Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 13, 2024

Add a separate job to the reusable-yamllint workflow to validate the (reusable) workflows against common errors and potential problems and show the results inline in pull requests.

In particular, this is intended to protect against errors being introduced in the reusable workflows, as not all of those are run from within this repo, so errors would only be discovered via a failing build in another repo, which does run the reusable workflow. This new job is intended to prevent this potential issue.

As this is a reusable workflow, other repos using this workflow will automatically inherit this job. While this may not be strictly necessary (as for other repos, the workflows will generally always be run), it also doesn't do any harm to have that extra verification in place.

Loosely based on wp-cli/.github#111

Refs:

Add a separate job to the `reusable-yamllint` workflow to validate the (reusable) workflows against common errors and potential problems and show the results inline in pull requests.

In particular, this is intended to protect against errors being introduced in the reusable workflows, as not all of those are run from within this repo, so errors would only be discovered via a failing build in _another_ repo, which does run the reusable workflow. This new job is intended to prevent this potential issue.

As this is a reusable workflow, other repos using this workflow will automatically inherit this job. While this may not be _strictly_ necessary (as for other repos, the workflows will generally always be run), it also doesn't do any harm to have that extra verification in place.

Loosely based on wp-cli/.github 111

Refs:
* https://github.com/rhysd/actionlinthttps://github.com/rhysd/actionlint
* https://github.com/rhysd/actionlint/blob/main/docs/README.md

Co-authored-by: Thorsten Frommen <[email protected]>
@jrfnl jrfnl force-pushed the feature/validate-reusable-workflows branch from 1c14d48 to dbd8014 Compare October 13, 2024 15:56
@jrfnl jrfnl merged commit 643d6da into main Oct 13, 2024
8 checks passed
@jrfnl jrfnl deleted the feature/validate-reusable-workflows branch October 13, 2024 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant